/** RunLog-light
 * Log your runs - A simple program for runners
 *  
 * @author M. Mueller
 * @version 15.01.10  
 */

package runlog;

//import com.google.inject.Inject;

/**
 *	Mocks I/O from Database.
 */
public class CDatabaseIOmock implements IDatabase {

	/**
	 * Mock. Initializes the database.
	 */
	public final void initDatabase() {
		System.out.println(" Datenbank initialisiert... ");
	}
	
	/**
	 * Mock.
	 * Loads Athlete from database.
	 * @param name1 Name of athlete to load.
	 * @return The loaded Athlete object.
	 */
	public final CAthlete loadAthleteFromDB(final String name1) {

		return new CAthlete(("Mocker " + name1), "00/00/00");
	}

	/**
	 * Mock.
	 * Saves Athlete to database.
	 * @param athlete1 the athlete to save to database.
	 */
	public final boolean addAthleteToDB(final CAthlete athlete1) {

		System.out.println(" added " + athlete1.getName());
		return true;
	}
	/**
	 * Mock.
	 * Deletes Athlete from database.
	 * @param name1 name of the athlete to delete from database.
	 * @return 'true' if deleted, 'false' if not.
	 */
	public final boolean deleteAthleteFromDB(final String name1) {

		System.out.println(" removed " + name1);
		return true;
	}
	/**
	 * Mock.
	 * Updates athlete's trainings in database.
	 * @param athlete1 the athlete to save to the database.
	 * @return 'true' if updated successfully, 'false' if not.
	 */
	public final boolean updateTrainingOfAthlete(final CAthlete athlete1) {
		
		System.out.println(" updated " + athlete1.getName());
		return true;
	}
	/**
	 * Mock.
	 * Prints all data.
	 *	@param athlete1 The athlete to print data from.
	 */
	public final void printAllTrainingData(final CAthlete athlete1) {
		
		System.out.println(" printing all data ");
	}
	/**
	 * Mock.
	 * Prints specific date.
	 *	@param athlete1 The athlete to print data from.
	 *	@param date1 The date of the training session
	 */
	public final void printOneDateTrainingData(final CAthlete athlete1, 
												final String date1) {
		
		System.out.println(" printing specific data ");
	}
}
